-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(spanner/spansql): support for parsing a DML file #6349
Conversation
@@ -32,7 +32,8 @@ func TestParseQuery(t *testing.T) { | |||
want Query | |||
}{ | |||
{`SELECT 17`, Query{Select: Select{List: []Expr{IntegerLiteral(17)}}}}, | |||
{`SELECT Alias AS aka From Characters WHERE Age < @ageLimit AND Alias IS NOT NULL ORDER BY Age DESC LIMIT @limit OFFSET 3` + "\n\t", | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These formatting changes were made by gopls
with its gofumpt
option.
@rahul2393 How about this PR review progress? |
Hello, @zchee this PR will be released in next release, review is in progress. |
@rahul2393 Thanks! can't wait to this feature :D |
The build was failed due to @rahul2393 Could you please check and rerun the build? |
spansql.ParseDML
corresponding to existingParseDDL
in order to support for parsing a DML file.Background
As I am a maintainer of the
cloudspannerecosystem/wrench
, which is a schema migration tool for Spanner, I'm planning to usespansql
in order to replace the current regex-based parsing.wrench
supports executing the multiple DMLs in a file, so I'd likespansql
to have theParseDML
function same as theParseDDL
function.Note
This PR does not add support for
Position
of DMLs. It should be added as another PR.